package br.com.treelayer.ged.ejb.crud;

import javax.ejb.Local;
import javax.ejb.Remote;
import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;

import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityHome;

import br.com.treelayer.ged.ejb.interfaces.IContratante;
import br.com.treelayer.ged.model.beans.Contratante;

/**
 * 
 * 
 * @author juliocs
 *
 */
@Local
@Remote
@Stateful
@Name( "contratanteServices")
public class ContratanteServices extends EntityHome<Contratante> implements IContratante {

	@In	EntityManager em;
	
	@Factory( value="contratante" )
	public Contratante initContratante(){
		return getInstance();
	}
	

	@Remove
	public String removeContratante(){
		return remove();
	}


	public EntityManager getEm(){
		
		return em;
	}
	
	/**
	 * @param em the em to set
	 */
	public void setEm(EntityManager em) {
		this.em = em;
	}

}
